The present invention relates to a technique regarding a range finder capable of taking three-dimensional information of a subject (namely, a three-dimensional camera capable of measuring a range image).
FIG. 21 is a diagram for showing the structure of a conventional range finder. In FIG. 21, a reference numeral 51 denotes a camera, reference numerals 52a and 52b denote light sources, a reference numeral 55 denotes a light source control unit and a reference numeral 56 denotes a distance calculation unit. The light source control unit 55 makes the light sources 52a and 52b alternately emit light every field cycle in synchronization with a vertical synchronizing signal of the camera 51.
At this point, it is assumed that the optical center of the camera lies at the origin with the optical axis direction of the camera set as the Z-axis, the horizontal direction set as the X-axis and the vertical direction set as the Y-axis, that the direction of a viewing point from the light sources is at an angle xcfx86 against the X-axis, that the direction of the viewing point from the camera is at an angle xcex8 against the X-axis, and that the light sources are positioned at (0,-D), namely, the base line length is D. The depth value Z of the viewing point P is calculated in accordance with the principle of triangulation calculation as follows:
Z=Dtan xcex8 tan xcfx86/(tan xcex8xe2x88x92tan xcfx86)xe2x80x83xe2x80x83(1)
In order to obtain the angle xcfx86, predetermined light patterns are projected by the light sources 52a and 52b. 
As the light sources 52a and 52b, for example, flash light sources 57 and 58 such as a xenon flash lamp are longitudinally disposed with reflector plates 57 and 58 disposed behind to be shifted in the lateral direction as shown in FIG. 22A. FIG. 22B is a plan view of the light sources of FIG. 22A. The light sources 52a and 52b radiate light in ranges A and B, respectively.
FIG. 23 is a diagram for showing light patterns radiated from the light sources 52a and 52b. In FIG. 23, the brightness obtained by projecting the light on a virtual screen Y is indicated along a direction of an arrow shown in the drawing. Specifically, the light projected from each of the light sources 52a and 52b has a characteristic that it is brightest on the center axis and is darker toward the periphery. Such a characteristic is exhibited because the reflector plates 59 and 60 each in the shape of a semi-cylinder are respectively disposed behind the flash light sources 57 and 58. Also, since the reflector plates 59 and 60 are shifted laterally in their directions, the projection ranges of the light sources 52a and 52b partially overlap each other.
FIG. 24 is a diagram for showing the relationship between the light projection angle xcfx86 in an H direction of FIG. 23 and the light intensity. The H direction accords with the direction of a crossing line between the virtual screen Y and one optional plane S among a plurality of planes each including the light source center and the lens center. In a region xcex1 of FIG. 24, one of the light patterns projected from the light sources 52a and 52b is bright relatively on the right hand side and the other is bright relatively on the left hand side, whereas the brightness of the light pattern is varied also along the height direction (Y-axis direction).
FIG. 25 is a graph for showing the relationship between the light intensity ratio between the two kinds of projected light in the region xcex1 of FIG. 24 and the light projection angle xcfx86. As shown in FIG. 25, the light intensity ratio and the angle xcfx86 are in a one-to-one corresponding relationship in the region xcex1.
In order to measure a distance, the two kinds of light patterns are alternately projected on a flat plane vertically provided so as to face the light sources at a predetermined distance and reflected light is taken by the camera 1, so that data of the relationship between the light intensity ratio and the light projection angle as shown in FIG. 25 can be previously obtained with respect to each Y-coordinate (corresponding to a Y-coordinate on the CCD). A data with respect to each Y-coordinate means a data with respect to each of the plural planes including the light source center and the lens center. Also, when the light sources 52a and 52b are disposed so that a line extending between the lens center of the camera 51 and the light sources 52a and 52b can be parallel to the X-axis of the CCD camera face, a distance can be accurately calculated by using the data of the relationship between the light intensity ratio and the light projection angle determined with respect to each Y-coordinate.
Assuming that a point P of FIG. 21 is the viewing point, the angle xcfx86 of the point P from the light source is measured by using the brightness ratio of the point P obtained images taken with the two kinds of light patterns projected and the relationship as shown in FIG. 25 corresponding to the Y-coordinate of the point P. Furthermore, the angle xcex8 of the point P from the camera is determined on the basis of the position in the image (namely, the pixel coordinate values of the point P) and camera parameters (such as the focal length and the position of the optical center of the lens system). Then, the distance is calculated in accordance with the equation (1) based on these two angles xcfx86 and xcex8 and the distance (base line length) D between the position of the light sources and the position of the optical center of the camera.
In this manner, when the light sources for generating the light patterns that are monotonically increased/decreased in accordance with the projection direction as in the region xcex1 of FIG. 24 are used, the three-dimensional measurement of a subject can be simply carried out.
However, in the conventional structure, the xenon flash lamp, which has a life of merely approximately 5000 stable emissions, is used as the light source. Therefore, when the range finder is used for a long period of time, maintenance such as exchange of the lamp should be frequently conducted. Also, the stability of the quantity of light emitted by the flash lamp is merely several %, and hence, higher measurement accuracy cannot be obtained.
Furthermore, a light source with a long life is, for example, an LED (light emitting diode), but the quantity of light emitted by one LED is small. Therefore, when the LED is singly used, the light quantity is so insufficient that the three-dimensional measurement cannot be stably carried out.
Moreover, since the projected light patterns are determined in accordance with the shapes of the reflector plates in the conventional structure, merely one set of light patterns can be generated in principle.
An object of the invention is providing a range finder usable for a long period of time and capable of executing stable three-dimensional measurement. Another object is easily generating optional light patterns in the range finder.
Specifically, the range finder of this invention for measuring a three-dimensional position of a subject by projecting light on the subject and receiving reflected light comprises a light source array unit in which a plurality of light sources are arranged; and a light source control unit for allowing at least two kinds of light patterns to be projected from the light source array unit by controlling a light emitting state of each of the plurality of light sources of the light source array unit.
According to this invention, since the light patterns are projected from the plural light sources included in the light source array unit, even when each light source has a small light quantity, a sufficiently large quantity of light can be projected on the subject as a whole, so that stable three-dimensional measurement can carried out. Also, since the light patterns are generated by controlling the light emitting states of the light sources of the light source array unit, an optional light pattern can be electrically generated without using a mechanical mechanism.
In the range finder, each of the plurality of light sources is preferably an LED. An LED has a characteristic that the light quantity is small but the life is comparatively long. Therefore, when the light source array unit is composed of the LEDs, a range finder usable for a long period of time can be realized.
Furthermore, the method of this invention for measuring a three-dimensional position of a subject based on reflected light images respectively obtained with at least two kinds of light patterns projected on the subject, comprises the steps of storing a parameter of an equation for approximating a space locus having a constant light intensity ratio between the two kinds of light patterns before three-dimensional measurement; obtaining a brightness ratio of a target pixel on the basis of reflected light images respectively obtained with the two kinds of light patterns projected; and carrying out the three-dimensional measurement by using the brightness ratio of the target pixel and the parameter of the space locus.
Alternatively, the method of this invention for measuring a three-dimensional position of a subject based on reflected light images respectively obtained with at least two kinds of light patterns projected on the subject, comprises the steps of storing a plurality of luminance ratio images in each of which a light intensity ratio between the two kinds of light patterns is expressed on a plane with a different fixed depth value before three-dimensional measurement; obtaining a brightness ratio of a target pixel based on reflected light images respectively obtained with the two kinds of light patterns projected; and carrying out the three-dimensional measurement by comparing the brightness ratio of the target pixel with a light intensity ratio in the vicinity of coordinates of the target pixel on each of the luminance ratio images.
Alternatively, the method of this invention for measuring a three-dimensional position of a subjected based on reflected light images respectively obtained with at least two kinds of light patterns projected on the subject, comprises the steps of storing a plurality of luminance ratio images in each of which a light intensity ratio between the two kinds of light patterns is expressed on a plane with a different fixed depth value before three-dimensional measurement; setting representative points on each of the luminance ratio images and determining a parameter of a relational expression between a light intensity ratio and a depth value of each of the representative points on the basis of the plurality of luminance ratio images and the different depth values respectively corresponding to the luminance ratio images; obtaining a light intensity ratio of a target pixel based on reflected light images respectively obtained with the two kinds of light patterns projected; and carrying out the three-dimensional measurement by using coordinate values of the target pixel, the light intensity ratio of the target pixel and the parameter of the relational expression between the light intensity ratio and the depth value of each of the representative points.
Moreover, the range finder of this invention for measuring a three-dimensional position of a subject by projecting light on the subject and receiving reflected light comprises a projection unit for projecting at least two kinds of light patterns; and a projected light pattern control unit for making a measurement range or measurement accuracy variable by changing a set of light patterns to be projected from the projection unit.
In this range finder, the measurement range or measurement accuracy can be controlled by changing a set of light patterns to be projected from the projection unit. As a result, a variety of measurement modes can be realized.
The light source apparatus of this invention comprises a plurality of light sources arranged therein, which is capable of projecting a desired light pattern by controlling a light emitting state of each of the plurality of light sources, and the plurality of light sources are arranged on a flat surface with optical axes thereof radially disposed.
Alternatively, the light source apparatus of this invention comprising a plurality of light sources arranged therein, which is capable of projecting a desired light pattern by controlling a light emitting state of each of the plurality of light sources, and a projection range is divided into a plurality of ranges in a direction for forming the light pattern, and groups of light sources respectively covering the plurality of divided ranges are aligned in a direction perpendicular to the direction for forming the light pattern.